import {http} from "@/api/index";

const cinema = {
    getCinemaList:'/cinema/findAll',
    getCinemaListCondition:'/cinema/findByCondition',
    addCinema:'/cinema/add',
    deleteCinemaById:'/cinema/delete',
    logicDeleteCinemaById:'/cinema/logicDelete',
    updateCinema:'/cinema/update',
}
export const getCinemaList = ()=>{
    return http.request({
        url:cinema.getCinemaList,
        method:'get',
    })
}

export const getCinemaListCondition = (params)=>{
    return http.request({
        url:cinema.getCinemaListCondition,
        method:'get',
        params: params
    })
}

export const addCinema = (params)=>{
    return http.request({
        url:cinema.addCinema,
        method:'post',
        data:params
    })
}

export const logicDeleteCinemaById = (cinemaId)=>{
    return http.request({
        url:cinema.logicDeleteCinemaById,
        method:'get',
        params:{
            cinemaId:cinemaId
        }
    })
}
export const deleteCinemaById = (cinemaId)=>{
    return http.request({
        url:cinema.deleteCinemaById,
        method:'get',
        params:{
            cinemaId:cinemaId
        }
    })
}
export const updateCinema = (params)=>{
    return http.request({
        url:cinema.updateCinema,
        method:'post',
        data:params
    })
}

